package main

import (
	"fmt"
	"reflect"
)

func main() {
	a := []int{1, 2, 3, 4, 5}
	//fmt.Printf("%T", a)
	fmt.Println(reflect.TypeOf(a))

	s := a[0:3:5]
	fmt.Println(reflect.TypeOf(s), s, len(s), cap(s))

	// s = a[0:3:1] // invalid slice index: 3 > 1
	// s = a[0:3:6] // slice bounds out of range

	s = a[2:3:4] // [low, high, maxhigh]
	fmt.Println(reflect.TypeOf(s), s, len(s), cap(s)) // []int [3] 1 1

	fmt.Println(s[0]) // 3

}
